<template>
  <el-dialog title="文章预览" :visible.sync="visible" v-if="visible">
    <article-detail :article="article"/>
  </el-dialog>
</template>

<script>
import ArticleDetail from '@/components/ArticleDetail.vue'

export default {
  name: 'ArticlePreview',
  components: { ArticleDetail },
  data () {
    return {
      article: {},
      visible: false
    }
  },
  methods: {
    init (articleId) {
      this.$http.get(`admin/article/info/${articleId}`).then(data => {
        this.article = data.data
        this.visible = true
      })
    }
  }
}
</script>

<style scoped>

</style>
